<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\View;
use App\Models\Output;
use App\Models\Theme;

/**
 * 后台管理基础类
 * @package App\Http\Controllers
 */
class AdminController extends Controller {

    private $adminTheme = 'default';
    protected $output;

    /**
     * 初始化
     */
    public function __construct() {
        $this->middleware('auth');

        //后台主题
        View::addNamespace("theme", base_path() . '/resources/views/admin/' . $this->adminTheme . '/');

        //初始化output
        $this->output = new Output();

        //初始化样式
        Theme::init();
//        Theme::addCss('');
//        Theme::addJs('');
    }
}
